package models

import "gorm.io/gorm"

type Role struct {
    gorm.Model
    Name        string `gorm:"unique;not null" json:"name"`
    Description string `json:"description"`
    Status      int    `gorm:"default:1" json:"status"`
    Permissions []Permission `gorm:"many2many:role_permissions;" json:"permissions"`
    Users       []User       `gorm:"foreignKey:RoleID" json:"-"`
}    